<include file="./Application/Home/View/default/public/header.html" title="个人中心"/>
<style type="text/css">
    .err-tips {
        color: red;
        float: right;
        margin: 0;
        padding: 10px 0;
        display: none;
    }
    #schedule .time_click{
        color: #333!important;
    }
    textarea{
        resize: none;
    }
</style>
<div id="teacher-form" class="teacher-form body-margin">
<div class="container">
<div class="row">
<div class="col-md-2 form-nav">
    <div class="list-group">
        <a href="#" class="list-group-item active">基本信息</a>
        <a href="/Home/Order/teacherorder" class="list-group-item">我的订单</a>
        <a href="/Home/Teacher/salary" class="list-group-item">我的工资</a>
    </div>
</div>
<div class="col-md-10 form-body">
<div class="form-body-content container form">
<div class="form-header text-center">
    <p class="heading title-1" style="display:block;">基本信息</p>
</div>
<hr>
<div class="form" id="teacher_form_1" style="display: block;">
    <!-- todo  -->
    <div class="personal-photo item">
        <iframe src="/Home/Teacher/upload" style="height: 235px" frameborder="0" scrolling="no"></iframe>
    </div>
    <hr>
    <form action="" id="info">
        <div class="item contact">
            <div class="row">
                <div class="col-md-3">
                    <label class="control-label" for="gender">
                        是否满课&nbsp;
                        <span class="must-fill">*</span>
                    </label>
                </div>
                <div class="col-md-9">
                    <div class="radio-inline">
                        <label>
                            <input type="radio" name="is_full"
                                   value="1" <?php if($data['is_full']=="1"){echo "checked";} ?> >
                            <span>已满课</span>
                        </label>
                    </div>
                    <div class="radio-inline">
                        <label>
                            <input type="radio" name="is_full"
                                   value="0" <?php if($data['is_full']=="0"){echo "checked";} ?> >
                            <span>未满课</span>
                        </label>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <label class="control-label" for="name">
                        姓名{$data.status}&nbsp;
                        <span class="must-fill">*</span>
                    </label>
                </div>
                <div class="col-md-9">
                    <if condition="$data.status eq 0">
                        <input class="form-control required" type="text" name="relname" id="name" maxlength="10" value="{$data.relname}" placeholder="请输入真实姓名">
                        <p class="err-tips">请输入正确姓名</p>
                        <else />
                        {$data.relname}<input class="form-control required" type="hidden" name="relname" id="name" maxlength="10" value="{$data.relname}" placeholder="请输入真实姓名">
                    </if>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <label class="control-label" for="gender">
                        性别&nbsp;
                        <span class="must-fill">*</span>
                    </label>
                </div>
                <div class="col-md-9">
                    <if condition="$data.status eq 0">
                    <div class="radio-inline">
                        <label>
                            <input type="radio" name="sex"
                                   value="1" <?php if($data['sex']=="1"){echo "checked";} ?> >
                            <span>男</span>
                        </label>
                    </div>
                    <div class="radio-inline">
                        <label>
                            <input type="radio" name="sex"
                                   value="2" <?php if($data['sex']=="2"){echo "checked";} ?> >
                            <span>女</span>
                        </label>
                    </div>
                    <else />
                        <?php if($data['sex']=="1"){echo "男";}else{echo "女";};?>
                    </if>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <label class="control-label" for="address">
                        所在地址&nbsp;
                        <span class="must-fill">*</span>
                    </label>
                </div>
                <div class="col-md-9">
                    <if condition="$data.status eq 0">
                    <input class="form-control" type="text" name="address" maxlength="100" value="{$data.address}" id="address" required="" placeholder="请输入您的地址">
                    <p class="err-tips">请输入正确地址</p>
                    <else />
                    {$data.address}<input class="form-control" type="hidden" name="address" maxlength="100" value="{$data.address}" id="address" required="" placeholder="请输入您的地址">
                    </if>
                </div>

            </div>
            <div class="row">
                <div class="col-md-3">
                    <label class="control-label" for="qq">
                        QQ&nbsp;
                    </label>
                </div>
                <div class="col-md-9">
                    <input class="form-control" type="text" name="qq" maxlength="14" id="qq"
                           value="{$data.qq}" placeholder="请输入您的qq号">
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <label class="control-label" for="qq">
                        支付宝&nbsp;
                    </label>
                </div>
                <div class="col-md-9">
                    <if condition="$data.status eq 0">
                    <input class="form-control" type="text" name="zhifubao" maxlength="100" id="zhifubao" value="{$data.zhifubao}" placeholder="请输入您的支付宝账号">
                    <else />
                    {$data.zhifubao}<input class="form-control" type="hidden" name="zhifubao" maxlength="100" id="zhifubao" value="{$data.zhifubao}" placeholder="请输入您的支付宝账号">
                    </if>
                </div>
            </div>
        </div>
        <!-- contact ENDS -->
        <hr>

        <div class="item school-info">
            <label class="control-label" for="school">
                学校信息&nbsp;
                <span class="must-fill">*</span>
            </label>

            <div class="school-details item">
                <div class="row">
                    <!-- @todo -->
                    <div class="col-md-3">
                        <if condition="$data.status eq 0">
                        <!-- <input class="form-control" type="text" name="school" id="school" placeholder="中国科学技术大学" maxlength="30" required value="中国科学技术大学"> -->
                        <select name="school" class="form-control">
                            <?php
                                                        foreach($school as $key => $val){
                            ?>
                            <option value="<?php echo $key; ?>"><?php echo $val; ?></option>
                            <?php
                                                }
                                                ?>
                        </select>
                        <else />
                        {$school[$data['school']]}<input class="form-control" type="hidden" name="school" maxlength="100" id="zhifubao" value="{$data.school}" placeholder="请输入您的支付宝账号">
                        </if>
                    </div>
                    <div class="col-md-3">
                        <if condition="$data.status eq 0">
                        <input class="form-control" type="text" name="college" id="major" placeholder="专业系别" maxlength="30" required="" value="{$data.college}">
                        <else />
                            {$data.college}<input class="form-control" type="hidden" name="school" maxlength="100" id="zhifubao" value="{$data.college}" placeholder="请输入您的支付宝账号">
                        </if>
                    </div>
                    <div class="col-md-3">
                        <select name="year" class="form-control">
                            <option value="年级">请选择年级</option>
                            <option value="大一"
                            <?php if($data['year']=='大一'){echo "selected"; } ?> >大一</option>
                            <option value="大二"
                            <?php if($data['year']=='大二'){echo "selected"; } ?> >大二</option>
                            <option value="大三"
                            <?php if($data['year']=='大三'){echo "selected"; } ?> >大三</option>
                            <option value="大四"
                            <?php if($data['year']=='大四'){echo "selected"; } ?> >大四</option>
                            <option value="研究生"
                            <?php if($data['year']=='研究生'){echo "selected"; } ?> >研究生</option>
                            <option value="其他"
                            <?php if($data['year']=='其他'){echo "selected"; } ?> >其他</option>
                        </select>
                    </div>
                    <div class="col-md-3">
                        <input class="form-control" type="text" name="number"
                               id="student_number" placeholder="学号" maxlength="15" required=""
                               value="{$data.number}"></div>
                </div>
            </div>
        </div>
        <hr>
</div>
<!-- todo -->
<div class="item teach-info">
<div class="row timetable">

<div class="row cee_points" style="display: block;">
    <div class="col-md-3">
        <label class="control-label" for="cee_points">高考成绩&nbsp;
            <span class="must-fill">*</span></label>
    </div>
    <div class="col-md-9">
        <if condition="$data.status eq 0">
        <input class="form-control" type="text" name="score" maxlength="140" value="{$data['score']}" placeholder="请输入您的高考成绩">
        <else />
        {$data['score']}<input class="form-control" type="hidden" name="score" maxlength="140" value="{$data['score']}" placeholder="请输入您的高考成绩">
        </if>
    </div>
</div>
<div class="row prize">
    <div class="col-md-3">
        <label class="control-label" for="prize">
            写下你的经历&nbsp;
            <span class="must-fill">*</span>
        </label>
    </div>
    <div class="col-md-9">
        <textarea  class="form-control" name="person_experience" rows="4" maxlength="200" required="">{$data['person_experience']}</textarea>
    </div>
</div>
<div class="row prize">
    <div class="col-md-3">
        <label class="control-label" for="prize">
            写下你的家教经历&nbsp;
            <span class="must-fill">*</span>
        </label>
    </div>
    <div class="col-md-9">
        <textarea class="form-control" name="tutor_experience" rows="4" maxlength="200" placeholder="" required="">{$data['tutor_experience']}</textarea>
    </div>
</div>

<div class="row prize">
    <div class="col-md-3">
        <label class="control-label" for="prize">
            自我描述&nbsp;
            <span class="must-fill">*</span>
        </label>
    </div>
    <div class="col-md-9">
        <textarea class="form-control" name="description" rows="4" maxlength="200" placeholder="" required="">{$data['description']}</textarea>
    </div>
</div>
<h4 style="margin:10px 15px;font-size: 16px;">Note：带有蓝色标记的是该教员的空闲时间。</h4>
<div class="row timetable timetable-preview">
    <div class="col-md-12">
        <div id="schedule">
            <div class="btn-group btn-group-justified btn-group-sm" style="width:100%;">
                <a class="btn btn-hover-success">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a class="btn btn-hover-success btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">上午</div>
                    </div>
                </a>
                <a class="btn btn-hover-success btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">下午</div>
                    </div>
                </a>
                <a class="btn btn-hover-success btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">晚上</div>
                    </div>
                </a>
            </div>
            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[0]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周一</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success morning time_click <?php if($date[0]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success afternoon time_click <?php if($date[0]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success night time_click <?php if($date[0]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>

            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[1]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周二</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success time_click <?php if($date[1]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success time_click <?php if($date[1]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success time_click <?php if($date[1]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>

            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[2]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周三</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success morning time_click <?php if($date[2]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success afternoon time_click <?php if($date[2]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success night time_click <?php if($date[2]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>

            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[3]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周四</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success morning time_click <?php if($date[3]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success afternoon time_click <?php if($date[3]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success night time_click <?php if($date[3]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>

            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[4]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周五</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success morning time_click <?php if($date[4]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success afternoon time_click <?php if($date[4]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success night time_click <?php if($date[4]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>

            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[5]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周六</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success morning time_click <?php if($date[5]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success afternoon time_click <?php if($date[5]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success night time_click <?php if($date[5]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>

            <div class="btn-group btn-group-justified btn-group-sm weekitem" style="width:100%;" data-id="{$date[6]['id']}">
                <a class="btn btn-hover-success day btn-title">
                    <div class="btn-wrapper">
                        <div class="label-block">周日</div>
                    </div>
                </a>
                <a data-time="morning" class="btn btn-hover-success morning time_click <?php if($date[6]['morning']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="afternoon" class="btn btn-hover-success afternoon time_click <?php if($date[6]['afternoon']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
                <a data-time="night" class="btn btn-hover-success night time_click <?php if($date[6]['night']==1) echo 'btn-active'; ?>">
                    <div class="btn-wrapper">
                        <div class="label-block"></div>
                    </div>
                </a>
            </div>
        </div>
        <!-- schedule ENDS -->

    </div>

</div>
</div>

<div class="row teach-grade">
    <div class="col-md-3">
        <label class="control-label" for="teach_grade" style="margin-top: 10px;">
            授课年级&nbsp;
            <span class="must-fill">*</span>
        </label>
    </div>
    <div class="col-md-9">
        <div class="teach-grade-content row" style="margin-top: 10px;margin-bottom: 15px;">
            <if condition="$data.status eq 0">
            <label class="checkbox-inline">
                <input type="checkbox" name="grade[]" value="1" <?php if(in_array(1,$data['grade'])){echo 'checked';} ?> >小学</label>
            <label class="checkbox-inline">
                <input type="checkbox" name="grade[]" value="2" <?php if(in_array(2,$data['grade'])){echo 'checked';} ?>
                id="junior">初中</label>
            <label class="checkbox-inline">
                <input type="checkbox" name="grade[]" value="3" <?php if(in_array(3,$data['grade'])){echo 'checked';} ?>
                id="senior">高中</label>
            <p class="err-tips" style="margin-right: 13px;">请选择授课年级</p>
            <else />
            <label class="checkbox-inline"><input type="checkbox" name="grade[]" value="1" <?php if(in_array(1,$data['grade'])){echo 'checked';} ?> disabled>小学</label>
            <label class="checkbox-inline"><input type="checkbox" name="grade[]" value="2" <?php if(in_array(2,$data['grade'])){echo 'checked';} ?> id="junior" disabled>初中</label>
            <label class="checkbox-inline"><input type="checkbox" name="grade[]" value="3" <?php if(in_array(3,$data['grade'])){echo 'checked';} ?> id="senior" disabled>高中</label>
            <p class="err-tips" style="margin-right: 13px;">请选择授课年级</p>
            <foreach name="data.grade" item="vo" >
            <input type="hidden" name="grade[]" value="{$vo}"/>
            </foreach>
            </if>
        </div>
    </div>
</div>
<div class="row select_subject" id="select_subject">
    <div class="col-md-3">
        <label class="control-label" for="select_subject">
            教学科目&nbsp;
            <span class="must-fill">*</span>
        </label>
    </div>
    <div class="col-md-9">
        <if condition="$data.status eq 0">
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="1" <?php if(in_array(1,$data['lesson'])){echo 'checked';} ?>>语文</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="2" <?php if(in_array(2,$data['lesson'])){echo 'checked';} ?>>数学</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="3" <?php if(in_array(3,$data['lesson'])){echo 'checked';} ?>>英语</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="4" <?php if(in_array(4,$data['lesson'])){echo 'checked';} ?>>物理</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="5" <?php if(in_array(5,$data['lesson'])){echo 'checked';} ?>>化学</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="6" <?php if(in_array(6,$data['lesson'])){echo 'checked';} ?>>生物</label>
        <p class="err-tips">请选择授课科目</p>
        <else />
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="1" <?php if(in_array(1,$data['lesson'])){echo 'checked';} ?> disabled>语文</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="2" <?php if(in_array(2,$data['lesson'])){echo 'checked';} ?> disabled>数学</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="3" <?php if(in_array(3,$data['lesson'])){echo 'checked';} ?> disabled>英语</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="4" <?php if(in_array(4,$data['lesson'])){echo 'checked';} ?> disabled>物理</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="5" <?php if(in_array(5,$data['lesson'])){echo 'checked';} ?> disabled>化学</label>
        <label class="checkbox-inline">
            <input type="checkbox" name="lesson[]" value="6" <?php if(in_array(6,$data['lesson'])){echo 'checked';} ?> disabled>生物</label>
        <p class="err-tips">请选择授课科目</p>
        <foreach name="data.lesson" item="vo" >
            <input type="hidden" name="lesson[]" value="{$vo}"/>
        </foreach>
        </if>
    </div>
</div>
</div>
</form>

<hr>
<div class="item">
    <button id="saveBtn" class="btn btn-primary my-style btn-lg next">保存</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<include file="./Application/Home/View/default/public/footer.html"/>
<script type="text/javascript" src="/Public/teacher/center/center.js"></script>
</body>
</html>
